package com.lgb.DAO;

import com.lgb.pojo.Comment;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface CommentRepository extends JpaRepository<Comment , Long> {

    //通过id查询 且 父类为空，即为最顶级的元素
    List<Comment> findByBlogIdAndParentCommentNull(Long BlogId , Sort sort);

}
